<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateCruiseOrderProcessTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cruise_order_process', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('cruiseOrderId')->default(0)->comment('cruiseOrderID');
            $table->unsignedInteger('step')->default(0)->comment('流程进度');
            $table->unsignedInteger('type')->default(0)->comment('任务类型');
            $table->unsignedInteger('status')->default(0)->comment('任务状态');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->index('cruiseOrderId', 'idx_cruiseOrderId');
            $table->comment = '巡店 - 流程任务';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('open_shop_cruise_process');
    }
}
